p $tmp=0
while $tmp<$cpu_number
  eval "tvariable $per_cpu_c_%d",$tmp
  eval "tvariable $per_cpu_cy_%d",$tmp
  eval "tvariable $per_cpu_tmp_0_%d",$tmp
  p $tmp=$tmp+1
end

trace *(handle_irq+67)
  commands
    teval $per_cpu_c_0=$per_cpu_c_0+1
    teval $per_cpu_tmp_0_0=$clock
  end

trace *(handle_irq+72) if ($per_cpu_c_0>100)
  commands
    teval $per_cpu_cy_0=$clock-$per_cpu_tmp_0_0+$per_cpu_cy_0
  end

define showall
p $tmp=0
p $all1=0
while $tmp<$cpu_number
  eval "p $per_cpu_cy_%d/($per_cpu_c_%d-100)",$tmp,$tmp

  eval "p $all1=$all1+$per_cpu_cy_%d/($per_cpu_c_%d-100)",$tmp,$tmp

  p $tmp=$tmp+1
end
p $all1/$cpu_number
end
